#include <stddef.h>
#include <stdio.h>
#include <time.h>

char *weekday(unsigned day)
{
	if (day >= 7)
		return NULL;

	static char *days[] = { "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" };
	return days[day];
}

int main()
{
	time_t now = time(NULL);
	struct tm * time = localtime(&now);
	puts(weekday(time->tm_wday));
	return 0;
}
